{% extends "employee/employee_base.html"%}
{% block currentPath %}
 >> <a href="/employee/products/">Products</a> >> {{operation}}   
{% endblock %}

{% block content %}
    <div id="notice">{{message}}</div>
    <form enctype="multipart/form-data" action="" method="post">{% csrf_token %}
    <table>
        <tr>
            <th>Category:</th><td> {{form.category}} Subcategory: {{form.subcategory}}</td>
            <td rowspan=4>{% if product %}<img src="/{{product.image}}"/>{% endif %}</td>
        </tr>
        <tr>
            <th>Name:</th><td>{{form.name}}</td>
        </tr>
        <tr>
            <th>Price:</th><td>{{form.price}}€</td>
        </tr>
        <tr>
            <th>Image:</th>
            <td>
                {{form.image}}<div class="form-note">Keep this empty if no change in image.</div>
            </td>
        </tr>
        <tr><th>Short description:</th><td colspan=2>{{form.shortDescription}}</td><div class="form-note">One scentence description of this product.</div></tr>
        <tr>
            <th>Description:</th><td colspan=2>{{form.description|safe}}</td>
        </tr>
        <tr>
            <th>Status:</th><td colspan=2> {{form.status}}</td>
        </tr>
        <tr>
            <th>Recommended:</th><td colspan=2>{{form.recommended}}</td>
        </tr>
        <tr>
            <td colspan=3 align="right">
            {% ifequal operation 'Add' %}
                <input type="submit" value="{{operation}}" />
            {% else %}
                {% ifequal operation 'Edit' %}
                <input type="submit" value="{{operation}}" />
                <input type="button" value="Delete" onclick="confirm_delete_button()" />
                {% endifequal %}
            {% endifequal %}
            </td>
        </tr>
    </table>
    </form>
{% endblock %}